package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OaInvoiceTypeMapper;
import com.ruoyi.system.domain.OaInvoiceType;
import com.ruoyi.system.service.IOaInvoiceTypeService;

/**
 * 发票类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-13
 */
@Service
public class OaInvoiceTypeServiceImpl implements IOaInvoiceTypeService 
{
    @Autowired
    private OaInvoiceTypeMapper oaInvoiceTypeMapper;

    /**
     * 查询发票类型
     * 
     * @param id 发票类型主键
     * @return 发票类型
     */
    @Override
    public OaInvoiceType selectOaInvoiceTypeById(Long id)
    {
        return oaInvoiceTypeMapper.selectOaInvoiceTypeById(id);
    }

    /**
     * 查询发票类型列表
     * 
     * @param oaInvoiceType 发票类型
     * @return 发票类型
     */
    @Override
    public List<OaInvoiceType> selectOaInvoiceTypeList(OaInvoiceType oaInvoiceType)
    {
        return oaInvoiceTypeMapper.selectOaInvoiceTypeList(oaInvoiceType);
    }

    /**
     * 新增发票类型
     * 
     * @param oaInvoiceType 发票类型
     * @return 结果
     */
    @Override
    public int insertOaInvoiceType(OaInvoiceType oaInvoiceType)
    {
        return oaInvoiceTypeMapper.insertOaInvoiceType(oaInvoiceType);
    }

    /**
     * 修改发票类型
     * 
     * @param oaInvoiceType 发票类型
     * @return 结果
     */
    @Override
    public int updateOaInvoiceType(OaInvoiceType oaInvoiceType)
    {
        return oaInvoiceTypeMapper.updateOaInvoiceType(oaInvoiceType);
    }

    /**
     * 批量删除发票类型
     * 
     * @param ids 需要删除的发票类型主键
     * @return 结果
     */
    @Override
    public int deleteOaInvoiceTypeByIds(Long[] ids)
    {
        return oaInvoiceTypeMapper.deleteOaInvoiceTypeByIds(ids);
    }

    /**
     * 删除发票类型信息
     * 
     * @param id 发票类型主键
     * @return 结果
     */
    @Override
    public int deleteOaInvoiceTypeById(Long id)
    {
        return oaInvoiceTypeMapper.deleteOaInvoiceTypeById(id);
    }
}
